<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <link rel="stylesheet" href="/webjars/bootstrap/3.4.1/css/bootstrap.min.css">
    <script src="/webjars/jquery/3.6.4/jquery.min.js"></script>
    <script src="/webjars/bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.min.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <style>
        .container{
            width: 500px;
        }
        .panel-title{
            padding:5px 0px;
        }
        .login{
            font-size: 22px;
        }
    </style>
</head>
<body>
<!--    <div class="container">-->
<!--        <div class="panel panel-primary">-->
<!--            <div class="panel-heading">-->
<!--                <h3 class="panel-title">-->
<!--                    <div class="login">用户登录</div>-->
<!--                </h3>-->
<!--            </div>-->
<!--            <div class="panel-body">-->
<!--                <form class="form-signin" action="/admin/acl/login" method="post">-->

<!--                    <input type="text" name="username" class="form-control" placeholder="输入用户名" required autofocus>-->

<!--                    <input type="password" name="password" class="form-control" placeholder="输入密码" required>-->
<!--                    <div class="checkbox">-->
<!--                        <label>-->
<!--                            <input type="checkbox"  name="remember-me"> 记住我-->
<!--                        </label>-->
<!--                    </div>-->
<!--                    <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>-->
<!--                </form>-->

<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
<div id="app">
    {{info}}
</div>
</body>
</html>

<script>
    new Vue({
        el:'#app',
        data:{
            user:{
                username:"admin",
                password:"123456"
            },
            info:{}
        },
        created() {
            axios
                .post('/admin/acl/login',this.user)
                .then(({data}) => {
                    this.info = data;
                })
                .catch(function (error) { // 请求失败处理
                    console.log(error);
                });
        }
    })
</script>